index.md (870B)
1 +++ 2 title = 'Point processing' 3 +++ 4 # Point processing 5 A simple function applied to each value — e.g. to lighten, y = x+C 6 7 Ex: change brightness of every pixel in the same way 8 9  10 11 ``` 12 b = imread(‘filename.bmp’); 13 b1 = imadd(b,128); 14 ``` 15 16 ## Type conversion 17 From RGB to grayscale (24 bits -> 8 bits) 18 19 ``` 20 I = imread(‘filename.bmp’); 21 J = rgb2gray(I); 22 ``` 23 24 ## Histogram stretching 25 26 A histogram graphs the amount of times each value from 0 to 255 occurs in an image. 27 28 You can stretch a histogram to equalise the image 29 30  31 32 ## Thresholding 33 34 - a gray scale image can be converted into binary (B&W) 35 - choose a grey level T (threshold), change each pixel based on relation to T 36 - white if >T, black if ≤T 37 38 